/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.myapp.service.dao;

import javax.servlet.http.HttpServletRequest;
import org.apache.struts.action.ActionForm;

/**
 *
 * @author toint
 */
public abstract class DAOFactory {

    public static final int ORACLE = 1;
    public static final int MOCK_TEST = 2;

    public abstract Object executeMethod(ActionForm paramActionForm, HttpServletRequest paramHttpServletRequest)
            throws Exception;

    public abstract void executeMethod(ActionForm paramActionForm, HttpServletRequest paramHttpServletRequest, Object paramObject)
            throws Exception;

    public static DAOFactory getDAOFactory(int factory) {
        switch (factory) {
            case 1:
                return new OracleDAOFactory();
            case 2:
                return null;
        }
        return null;
    }
}
